export const toolsMixin = {
    methods:{
        setThemeColor(data){
            for(let item of data) {
                document.getElementById(item.el).style[item.property] = this.$store.getters.store_system_config.theme_color;
            }
        }
    }
}

export const tableMixin = {
  methods: {
    tableHeaderClassName() {
        return 'table-header-bg';
    },
    tableRowClassStyle() {
        return {
            'height': '54px !important',
            'min-height': '54px !important',
            
        };
    },
  }
}

/**
 * 分页相关
 */
export const handleSizeChangeMixin = {
    methods: {
        handleCurrentChange(val) {
            this.listQuery.page = val;
            this.currentPage = val;
            //this.getList();
        },
        resolvePageSizeChange(limit) {
            Object.assign(this.listQuery, {
                limit: limit
            });
            this.currentPage = 1;
            this.handleCurrentChange(1);
        },
        setPage(response) {
            this.total = response.data['paging']["total"];
        },
        handleSizeChange(val) {
            this.resolvePageSizeChange(val);
        }
    }
};